<#include "/common/head.ftl">

<@showTitle title="${i18n.getMessage('midtermTest')} > ${i18n.getMessage('list')}">
	<a href="#" onclick="pp('study/showReportMidtermTest.sgt?offeringId=${offering.id}')">${i18n.getMessage('report')}</a>
	- <a href="#" onclick="cc('study/showTestResult.sgt?offeringId=${offering.id}')">${i18n.getMessage('result')}</a>
	- <a href="#" onclick="cc('offering/showInfoOffering.sgt?id=${offering.id}')">${i18n.getMessage('offering')}</a>
</@showTitle>

<br/>

<div id="error" style="display:none"></div>

<form action="study/editMidtermTest.sgt" validator="study/validateMidtermTest.sgt" onsubmit="submitFormValidation(this); return false;" onreset="$('error').hide()">
	<input type="hidden" name="offeringId" value="${offering.id}"/>
	
	<@display.table id="listTable" name="offeringMembers">
		<@display.column title="${i18n.getMessage('ordinalNumber')}" style="text-align:center">${listTable_rowNum}</@display.column>
		<@display.column title="${i18n.getMessage('lastName')}"><span <#if (!listTable.active)>style="text-decoration: line-through"</#if>>${(listTable.receipt.student.lastName)!}</span></@display.column>
		<@display.column title="${i18n.getMessage('firstName')}"><input type="hidden" name="ids" value="${(listTable.midtermTest.id)!}"/> <span <#if (!listTable.active)>style="text-decoration: line-through"</#if>>${(listTable.receipt.student.firstName)!}</span></@display.column>
		<@display.column title="${i18n.getMessage('dateOfBirth')}" style="text-align:center">${(listTable.receipt.student.dateOfBirth?date)!}</@display.column>
		
		<@showWhenChildren offering>
			<@display.column title="${i18n.getMessage('listening')}" style="text-align:center"><input name="listenings" value="${(listTable.midtermTest.listening)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('readingAndWriting')}" style="text-align:center"><input name="readings" value="${(listTable.midtermTest.reading)!}" style="text-align:center;width:50px"/></@display.column>	
		</@showWhenChildren>
		
		<@showWhenTeenager offering>
			<@display.column title="${i18n.getMessage('listening')}" style="text-align:center"><input name="listenings" value="${(listTable.midtermTest.listening)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('grammar')}" style="text-align:center"><input name="grammars" value="${(listTable.midtermTest.grammar)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('reading')}" style="text-align:center"><input name="readings" value="${(listTable.midtermTest.reading)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('writing')}" style="text-align:center"><input name="writings" value="${(listTable.midtermTest.writing)!}" style="text-align:center;width:50px"/></@display.column>	
		</@showWhenTeenager>
		
		<@showWhenGE offering>
			<@display.column title="${i18n.getMessage('listening')}" style="text-align:center"><input name="listenings" value="${(listTable.midtermTest.listening)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('pronun')}" style="text-align:center"><input name="pronunciations" value="${(listTable.midtermTest.pronunciation)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('grammar')}" style="text-align:center"><input name="grammars" value="${(listTable.midtermTest.grammar)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('reading')}" style="text-align:center"><input name="readings" value="${(listTable.midtermTest.reading)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('writing')}" style="text-align:center"><input name="writings" value="${(listTable.midtermTest.writing)!}" style="text-align:center;width:50px"/></@display.column>	
		</@showWhenGE>
		
		<@showWhenOther offering>
			<@display.column title="${i18n.getMessage('listening')}" style="text-align:center"><input name="listenings" value="${(listTable.midtermTest.listening)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('grammar')}" style="text-align:center"><input name="grammars" value="${(listTable.midtermTest.grammar)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('reading')}" style="text-align:center"><input name="readings" value="${(listTable.midtermTest.reading)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('writing')}" style="text-align:center"><input name="writings" value="${(listTable.midtermTest.writing)!}" style="text-align:center;width:50px"/></@display.column>	
		</@showWhenOther>
		
		<@display.column title="${i18n.getMessage('comment')}" style="text-align:center"><input name="comments" value="${(listTable.midtermTest.comment)!}" style="text-align:center;width:60px" onfocus="displayPopup('pages/study/newsletter.htm', this); return false"/></@display.column>
		<@display.column title="${i18n.getMessage('total')}" style="text-align:center">${(listTable.midtermTest.total)!}</@display.column>
	</@display.table>
	<div style="text-align:center">
		<br/>
		<input type="submit" value="${i18n.getMessage('edit')}" class="button_style"/>
		<input type="reset" value="${i18n.getMessage('reset')}" class="button_style"/>
	</div>
</form>

<br/>